Puppet installing multiple packages results in Package[undef] error

Posted by Andy Shinn on Server Fault See other posts from Server Fault or by Andy Shinn
Published on 2012-09-06T02:12:11Z Indexed on 2012/09/06 3:39 UTC
Read the original article Hit count: 116

Filed under:

I am receiving the following error on a Puppet agent when trying to install multiple packages at once:

err: /Stage[main]/Template::Infrastructure/Package[undef]/ensure: change from absent to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install undef' returned 1: Error: Nothing to do

The code generating the error is:

$packages = [ 'qemu-kvm', 'qemu-kvm-tools', 'drbd84-tools', 'kmod-drbd84' ]
package {
  $::packages :
    ensure  =>  'installed',
    require =>  Class['yumrepos::elrepo']
}

The problem is intermittent. Is there a better way to install multiple packages at once without having to setup a package resource for each?

© Server Fault or respective owner

Related posts about puppet